% TEST_ID: LANG-EXPAND-0114
% CATEGORY: language/string
% 测试 string 的拼接

function test_string_pad()
x = {'fdsa', 'ss'};
y = pad(x);
assert(strcmp(y{1}, 'fdsa'));
assert(strcmp(y{2}, 'ss  '));

x = 'sdf';
y = pad(x, 5);
assert(strcmp(y, 'sdf  '));
y = pad(x, 5, 'left');
assert(strcmp(y, '  sdf'));
y = pad(x, 5, 'both');
assert(strcmp(y, ' sdf '));
y = pad(x, 5, 'right', 'e');
assert(strcmp(y, 'sdfee'));
